list1 = [0,1,2,3,4,5,6,7]
print(list1)
num1 = input('请输入一个整数:')
num2 = input('请再输入一个整数:')
num1 = int(num1)
num2 = int(num2)
if num1 < num2:
    print(list1[num1:num2])
else:
    print(list1[num2:num1])

d = {1:'a',2:'b'}
print(d)
a = input('请输入一个键:')
#b = d.keys()
if  a not in d.keys():
    print(d.keys(),'您输入的键不存在')
#:
    #print(b, '您输入的键不存在')

a = [1,2]
b = [2,3]

d = dict.fromkeys(a)
print(d)
d.setdefault(b)
print(d)